#!/bin/sh

#=========================================
echo ===== Show Config
#=========================================

config_file=$PWD/tomcat6/webapps/ROOT/WEB-INF/config.xml

echo -e "login cms ip: \033[0;31;2m $(cat "$config_file" | grep '"LoginCmsIp"' | awk '{print $3}' | cut -d '"' -f 2) \033[0;0;0m"
echo -e "login cms port: \033[0;31;2m $(cat "$config_file" | grep '"LoginCmsPort"' | awk '{print $3}' | cut -d '"' -f 2) \033[0;0;0m"
echo -e "web server id: \033[0;31;2m $(cat "$config_file" | grep "WebServerID" | awk '{print $3}' | cut -d '"' -f 2) $(cat "$config_file" | grep "WEBID" | awk '{print $3}' | cut -d '"' -f 2) \033[0;0;0m"

echo -e "activex cms ip: \033[0;31;2m $(cat "$config_file" | grep '"CmsIP"' | awk '{print $3}' | cut -d '"' -f 2) \033[0;0;0m"
echo -e "activex cms port: \033[0;31;2m $(cat "$config_file" | grep '"CmsPort"' | awk '{print $3}' | cut -d '"' -f 2) \033[0;0;0m"
echo -e "activex cms internet ip: \033[0;31;2m $(cat "$config_file" | grep '"CmsIP_Iter"' | awk '{print $3}' | cut -d '"' -f 2) \033[0;0;0m"
echo -e "activex cms internet port:\033[0;31;2m $(cat "$config_file" | grep '"CmsPort_Iter"' | awk '{print $3}' | cut -d '"' -f 2) \033[0;0;0m"

echo -e "upload path:\033[0;31;2m $(cat $PWD/tomcat6/conf/Catalina/localhost/upload.xml | grep "docBase=" | awk '{print $2}' | cut -d '"' -f 2) \033[0;0;0m"

